home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ACORNET / OLD-VERSIONS / ANET013A / !Acornet / Apps / !ArcWeb / !Run < prev    next >
Text File  |  1996-02-09  |  3KB  |  75 lines

  1. | !Run for ArcWeb
  2. |
  3. | Copyright (C) Stewart Brodie, 1994, 1995, 1996
  4. |
  5. |
  6. | Have a look at the host computer system and determine if we can run on it,
  7. | and if so, which extra modules we need.  All the extra hoops about RISC OS
  8. | 3.6 are necessary to avoid annoying people with Toolbox in ROM.
  9. |
  10. RmEnsure UtilityModule 3.10 Error 0 ArcWeb requires RISC OS 3.10 or later
  11. |
  12. WimpSlot -min 640K
  13. |
  14. RmEnsure DrawFile 1.43 RMLoad System:Modules.DrawFile
  15. RmEnsure DrawFile 1.43 Error 0 You need at least DrawFile 1.43 to run ArcWeb
  16. RmEnsure FilterManager 0.09 RMLoad System:Modules.FilterMgr
  17. RmEnsure FilterManager 0.09 Error 0 You need at least Filter Manager 0.09 to run ArcWeb
  18. RMEnsure BorderUtils 0.02 RmEnsure WindowManager 3.17 RMLoad System:modules.BorderUtil
  19. |
  20. | Follow PRM (4:497) advice and prevent multiple running
  21. |
  22. If "<ArcWeb$Running>" = "yes" Then Error ArcWeb is already running
  23. |
  24. |
  25. | Find out if we are in a read-only filing system
  26. |
  27. Set ArcWeb$Dir <Obey$Dir>
  28. Set ArcWeb$Path <Obey$Dir>.
  29. <Obey$Dir>.ROFS
  30. |
  31. |
  32. | If the cache location is unknown (haven't seen !WebCache) AND we are in a read/write
  33. | filing system, then use a subdirectory of ourselves as a last resort
  34. |
  35. If "<ArcWeb$CacheDir>" = "" Then If "<ArcWeb$ROFS_Status>" = "no" Then Set ArcWeb$CacheDir <ArcWeb$Dir>.WWWcache
  36. If "<ArcWeb$CacheDir>" = "" Then If "<Wimp$ScrapDir>" <> "" Then Set ArcWeb$CacheDir <Wimp$ScrapDir>.WWWCache
  37. If "<ArcWeb$CacheDir>" = "" Then Error You must find a !WebCache in a read/write filing system before running !ArcWeb
  38. Unset ArcWeb$ROFS_Status
  39. |
  40. | Note that this is a special syntax for ArcWeb$Home ONLY.  On startup, ArcWeb
  41. | automatically converts this into a valid local: URL.
  42. | The local://riscos-full-path syntax is allowed to allow you to use
  43. | variables such as <arcweb$dir> in the ArcWeb$Home variable
  44. |
  45. If "<ArcWeb$Home>" = "" Then Set ArcWeb$Home local://<ArcWeb$Dir>.PublicHTML.Welcome
  46. |
  47. | The default hotlist is <ArcWeb$HotLists>.usrHotList, the directory is .Bookmarks on the end of that
  48. |
  49. If "<ArcWeb$HotLists>" = "" Then Set ArcWeb$HotLists <ArcWeb$CacheDir>
  50. |
  51. | Now set the user preferences file
  52. |
  53. If "<ArcWeb$Choices>" = "" Then Set ArcWeb$Choices <ArcWeb$CacheDir>.Choices
  54. |
  55. | Locate the directory containing the helpers (need to guess if we don't know)
  56. |
  57. If "<ArcWeb$Helper$Dir>" = "" Then Set ArcWeb$Helper$Dir <ArcWeb$Dir>.^.!WebHelper.AppDir
  58. |
  59. Set File$Type_FAF HTML
  60. Set Alias$@RunType_FAF Run <Arcweb$Dir>.!Run %%*0
  61. |
  62. IconSprites <ArcWeb$Dir>.!Sprites
  63. Set ArcWeb$CFSIOptions -nomode -max96K
  64. If "<Mime$Types>" = "" Then Set Mime$Types <Obey$Dir>.mime/types
  65. If "<ArcWeb$AuthFile>" = "" Then Set ArcWeb$AuthFile <Obey$Dir>.Auth_DB
  66. |
  67. | Ensure enough memory is present, and claim the minimum we can survive with to start
  68. | up, which will expand to the first value on a 8 section cache after initialisation
  69. |
  70. WimpSlot -min 448K -max 448K
  71. |
  72. | You can change the number after -cache to be the number of cache sections you will
  73. | have.  This will make the cache size 75*number entries big. eg. 5*75 = 375 entry cache
  74. |
  75. Run <ArcWeb$Dir>.!RunImage -cache 5 %*0